import Editor from "../../editor"

export default function withLogger (editor: Editor) {
  const apply = editor.apply.bind(editor);
  editor.apply = (operation) => {
    console.log('operation', operation);
    apply(operation);
  }
  return editor
}